<exclude-pattern>*/includes/parser/Preprocessor_Hash\.php</exclude-pattern>
<exclude-pattern>*/includes/parser/Preprocessor\.php</exclude-pattern>
<exclude-pattern>*/includes/PathRouter\.php</exclude-pattern>
- <exclude-pattern>*/includes/poolcounter/PoolCounter\.php</exclude-pattern>
<exclude-pattern>*/includes/PrefixSearch\.php</exclude-pattern>
<exclude-pattern>*/includes/profiler/SectionProfiler\.php</exclude-pattern>
<exclude-pattern>*/includes/search/SearchEngine\.php</exclude-pattern>
is no longer a problem, because the code now ensures the timestamp is always
higher than the previous one. The writes are guarded with CAS logic (check
and set), which prevents updates that would overlap.
+* $wgDBmysql5 (T196185) - This experimental setting, deprecated in 1.31, has
+ been removed.
=== New user-facing features in 1.33 ===
* (T96041) __EXPECTUNUSEDCATEGORY__ on a category page causes the category
'PhpXmlBugTester' => __DIR__ . '/includes/installer/PhpBugTests.php',
'Pingback' => __DIR__ . '/includes/Pingback.php',
'PoolCounter' => __DIR__ . '/includes/poolcounter/PoolCounter.php',
+ 'PoolCounterNull' => __DIR__ . '/includes/poolcounter/PoolCounterNull.php',
'PoolCounterRedis' => __DIR__ . '/includes/poolcounter/PoolCounterRedis.php',
'PoolCounterWork' => __DIR__ . '/includes/poolcounter/PoolCounterWork.php',
'PoolCounterWorkViaCallback' => __DIR__ . '/includes/poolcounter/PoolCounterWorkViaCallback.php',
- 'PoolCounter_Stub' => __DIR__ . '/includes/poolcounter/PoolCounter.php',
'PoolWorkArticleView' => __DIR__ . '/includes/poolcounter/PoolWorkArticleView.php',
'PopulateArchiveRevId' => __DIR__ . '/maintenance/populateArchiveRevId.php',
'PopulateBacklinkNamespace' => __DIR__ . '/maintenance/populateBacklinkNamespace.php',
*/
$wgDBerrorLogTZ = false;
-/**
- * Set to true to engage MySQL 4.1/5.0 charset-related features;
- * for now will just cause sending of 'SET NAMES=utf8' on connect.
- *
- * @warning THIS IS EXPERIMENTAL!
- *
- * May break if you're not using the table defs from mysql5/tables.sql.
- * May break if you're upgrading an existing wiki if set differently.
- * Broken symptoms likely to include incorrect behavior with page titles,
- * usernames, comments etc containing non-ASCII characters.
- * Might also cause failures on the object cache and other things.
- *
- * Even correct usage may cause failures with Unicode supplementary
- * characters (those not in the Basic Multilingual Plane) unless MySQL
- * has enhanced their Unicode support.
- *
- * @deprecated since 1.31
- */
-$wgDBmysql5 = false;
-
/**
* Set true to enable Oracle DCRP (supported from 11gR1 onward)
*
'tablePrefix' => $mainConfig->get( 'DBprefix' ),
'flags' => DBO_DEFAULT,
'sqlMode' => $mainConfig->get( 'SQLMode' ),
- 'utf8Mode' => $mainConfig->get( 'DBmysql5' )
];
$lbConf['servers'][$i] = $server;
'load' => 1,
'flags' => $flags,
'sqlMode' => $mainConfig->get( 'SQLMode' ),
- 'utf8Mode' => $mainConfig->get( 'DBmysql5' )
];
if ( in_array( $server['type'], $typesWithSchema, true ) ) {
$server += [ 'schema' => $mainConfig->get( 'DBmwschema' ) ];
$lbConf['serverTemplate']['schema'] = $mainConfig->get( 'DBmwschema' );
}
$lbConf['serverTemplate']['sqlMode'] = $mainConfig->get( 'SQLMode' );
- $lbConf['serverTemplate']['utf8Mode'] = $mainConfig->get( 'DBmysql5' );
}
}
}
public function closeAll() {
- $this->forEachLBCallMethod( 'closeAll', [] );
+ $this->forEachLBCallMethod( 'closeAll' );
}
public function setAgentName( $agent ) {
*/
private $readOnlyBySection = [];
- /** @var array Load balancer factory configuration */
- private $conf;
-
/** @var LoadBalancer[] */
private $mainLBs = [];
public function __construct( array $conf ) {
parent::__construct( $conf );
- $this->conf = $conf;
$required = [ 'sectionsByDB', 'sectionLoads', 'serverTemplate' ];
$optional = [ 'groupLoadsBySection', 'groupLoadsByDB', 'hostsByName',
'externalLoads', 'externalTemplateOverrides', 'templateOverridesByServer',
* that start with "nowait:". However, only 0 timeouts (non-blocking requests)
* can be used with "nowait:" keys.
*
- * By default PoolCounter_Stub is used, which provides no locking. You
+ * By default PoolCounterNull is used, which provides no locking. You
* can get a useful one in the PoolCounter extension.
*/
abstract class PoolCounter {
public static function factory( $type, $key ) {
global $wgPoolCounterConf;
if ( !isset( $wgPoolCounterConf[$type] ) ) {
- return new PoolCounter_Stub;
+ return new PoolCounterNull;
}
$conf = $wgPoolCounterConf[$type];
$class = $conf['class'];
return $type . ':' . ( hexdec( substr( sha1( $key ), 0, 4 ) ) % $slots );
}
}
-
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PoolCounter_Stub extends PoolCounter {
-
- public function __construct() {
- /* No parameters needed */
- }
-
- public function acquireForMe() {
- return Status::newGood( PoolCounter::LOCKED );
- }
-
- public function acquireForAnyone() {
- return Status::newGood( PoolCounter::LOCKED );
- }
-
- public function release() {
- return Status::newGood( PoolCounter::RELEASED );
- }
-}
--- /dev/null
+<?php
+/**
+ * Provides of semaphore semantics for restricting the number
+ * of workers that may be concurrently performing the same task.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * A default PoolCounter, which provides no locking.
+ */
+class PoolCounterNull extends PoolCounter {
+
+ public function __construct() {
+ /* No parameters needed */
+ }
+
+ public function acquireForMe() {
+ return Status::newGood( PoolCounter::LOCKED );
+ }
+
+ public function acquireForAnyone() {
+ return Status::newGood( PoolCounter::LOCKED );
+ }
+
+ public function release() {
+ return Status::newGood( PoolCounter::RELEASED );
+ }
+}
*
* @since 1.22
*/
-class RedisPubSubFeedEngine extends RCFeedEngine {
+class RedisPubSubFeedEngine extends FormattedRCFeed {
/**
* @see FormattedRCFeed::send
if ( $conn !== false ) {
$conn->publish( $channel, $line );
return true;
- } else {
- return false;
}
+
+ return false;
}
}
* @param string $path
* @param array $info
* @param int $version manifest_version for info
- * @return array
*/
public function extractInfo( $path, array $info, $version ) {
$dir = dirname( $path );